
Ext.require([
    'Ext.tab.*',
    'Ext.window.*',
    'Ext.tip.*',
    'Ext.layout.container.Border'
]);
Ext.onReady(function(){
    var win,
        button = Ext.get('show-btn');

    button.on('click', function(){

        if (!win) {
            win = Ext.create('widget.window', {
                title: 'Alpha Manager',
                closable: true,
                closeAction: 'hide',
                width: 600,
                minWidth: 350,
                height: 350,
                layout: 'border',

                items: [ {
                    region: 'center',
                    xtype: 'tabpanel',
                    items: [{
                        title: 'Autores',
                        html: ' <h2>- Carlos Aquino <br> - Adolfo Martinez <br> - Santiago Vera</h2>'
                    }, {
                        title: 'Descripcion',
                        html: '<h2>Gestor de Proyectos</h2>'
                    }]
                }]
            });
        }
        button.dom.disabled = true;
        if (win.isVisible()) {
            win.hide(this, function() {
                button.dom.disabled = false;
            });
        } else {
            win.show(this, function() {
                button.dom.disabled = false;
            });
        }
    });
});
